home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / HAM_RAD / 0088.ZIP / WB6UUT.TXT < prev    next >
Text File  |  1985-06-15  |  21KB  |  379 lines

  1. .          A Proposed Level 3 Routing Algorithm for
  2. .                     Amateur Packet Radio
  3. .
  4. .                   By Lynn W. Taylor, WB6UUT
  5. .
  6. .Yea, from the table of my memory
  7. .I'll wipe away all trivial fond records.
  8. .                        -- Hamlet (Act I, Scene 5, line 98)
  9. .
  10. .    According  to the ISO Open Systems Interconnect  model,  the
  11. network  controllers are responsible for the first three  of  the 
  12. seven  protocol layers in a packet switched network.     Layer 1, 
  13. the  Physical level,  is responsible for the physical aspects  of 
  14. communication (radios,  modems,  HDLC, baud rates).  Layer 2, the 
  15. Data  Link level,  is responsible for taking the physical  medium 
  16. and  making  it error-free,  and dividing it up among the  users.  
  17. The  third layer,  called the Network,  or Communications  Subnet 
  18. level  determines the host-subnet interface and how  packets  are 
  19. routed  in the subnet.   Levels 4 through 7 deal with issues that 
  20. are beyond the scope of this paper.
  21. .
  22. .    Routing   is  one  of  the  key  issues  when   defining   a
  23. Communications  Subnet  Level  protocol.    The  various  routing 
  24. algorithms can be divided into two categories, centralized (where 
  25. some  central station must know or discover the network topology, 
  26. and  serve  as  a clearinghouse for  routing)  and  decentralized 
  27. (where  each TNC can handle at least part of the  routing  task).  
  28. Centralized  algorithms  must  be designed to  recover  when  the 
  29. master  station crashes,  and each station must know how to reach 
  30. the router itself.  Decentralized algorithms require each station 
  31. to  know  how to pass traffic to other stations in  the  net;  to 
  32. accomplish  this,  the TNC needs to find out something about  the 
  33. nework topology.
  34. .
  35. .    I  am going to discuss two specific routing algorithms,  the
  36. advantages  and drawbacks of each,  and why I believe  we  should 
  37. select  a decentralized algorithm for Amateur use.   None of this 
  38. material is original, and most is discussed at some length in the 
  39. computer  science literature.   Some of the combinations of  this 
  40. information are new,  particularly as they relate to the specific 
  41. problems of Amateur usage.
  42. .
  43. .    The  first  algorithm has a couple of  advantages,  and  one
  44. major disadvantage.   This algorithm does not require any special 
  45. knowlege of the network topology,  other than a list of  stations 
  46. that the TNC can hear.   When the TNC receives a packet addressed 
  47. to someone other than itself,  it simply passes it on to everyone 
  48. it  can  hear  except  the station  it  received  it  from.   The 
  49. algorithm is appropriately called Flooding.
  50. .
  51. .    Flooding is easy to understand,  and easy to implement.  The
  52. problem comes when the load on the network increases.  Since each 
  53. packet  will pass through every single node in the  network,  and 
  54. many of them more than once,  the amount of traffic generated  by 
  55. simply saying "Hi" can be staggering.   Also, steps must be taken 
  56. to prevent packets from looping forever through the network.  The 
  57. simplest  case of this is a 4 station net (A,  B,  C and D) where 
  58. all 4 stations can hear each other.  If A originates a packet for 
  59. D,  it passes it to all 3 stations it can hear.   B passes it  to 
  60. both C and D,  where D accepts it, and C passes it to A and D.  D 
  61. has  already  got the packet and ignores the duplicate,  while  A 
  62. passes  it to B and D.   Again,  D discards it,  and B passes  it 
  63. around.   At  the same time,  packets are flowing in the opposite 
  64. direction around the same loop.   While this simple case could be 
  65. easily  fixed,  it  becomes more complex in a  larger  net.   One 
  66. solution  is to limit the life of any given packet to  a  certain 
  67. number  of  hops,  but this still generates a lot of  unnecessary 
  68. traffic.
  69. .
  70. .    A  better algorithm would require  each TNC to have a  table
  71. giving the address of each node in the network,  some measure  of 
  72. the distance to that station, and the address of the next station 
  73. along a path to that station.   A hypothetical 5 station net, and 
  74. each node's tables is shown below:
  75. .
  76. .               A <---> B <---> C <---> D <---> E
  77. .
  78. .             B 1 B   A 1 A   A 2 B   A 3 C   A 4 D
  79. .             C 2 B   C 1 C   B 1 B   B 2 C   B 3 D
  80. .             D 3 B   D 2 C   D 1 D   C 1 C   C 2 D
  81. .             E 4 B   E 3 C   E 2 D   E 1 E   D 1 D
  82. .
  83. .    In  this  example,  the available communications  paths  are
  84. shown  by  arrows (i.e.  A cannot communicate directly  with  C).     
  85. Note that each station knows how far away all the other  stations 
  86. are,  and  who is the next station in the chain.   If A wants  to 
  87. talk to D,  A knows to pass traffic to D, and it will take 3 hops 
  88. to get there.  It is up to B to know who to pass these packets on 
  89. to.
  90. .
  91. .    The  problem  with  this method is easy to see  -- where  do
  92. these tables come from?   In the proposed WestNet protocol, which 
  93. defines a long-haul network for linking geographically  seperated 
  94. LANs,  a  similar  algorithm  is  used which  assumes  all  nodes 
  95. internal  to  the network will stay on.   In  other  words,  this 
  96. network is static (because all the nodes are dedicated devices to 
  97. be  installed  on mountaintops).   In a local  network,  stations 
  98. (nodes) tend to appear and disappear frequently.
  99. .
  100. .    In  a dynamic network,  the answer to the question  must  be
  101. "from  the  network  itself."   This  further  divides  into  two 
  102. problems:  how does a new station get it's initial table, and how 
  103. do  we  make  sure the table each node has is  up  to  date.   To 
  104. clarify this problem, lets add station F to our earlier network:
  105. .
  106. .               A <---> B <---> C <---> D <---> E
  107. .               ^                               ^
  108. .               |                               |
  109. .                -------------> F <-------------
  110. .
  111. .    In this example,  A should now pass traffic for E through F,
  112. while  traffic  for  D  can follow it's  previous  route,  or  as 
  113. efficiently  through  E and F.   If all stations listen  for  new 
  114. stations on the air,  and F comes on and sends an "I'm here"  (or 
  115. CQ) packet,  A and  E can detect F's presence,  connect with F to 
  116. make sure they can communicate,  and pass copies of their routing 
  117. tables.   By taking the best information from both tables,  F can 
  118. build it's initial table:
  119. .
  120. .                             A 1 A
  121. .                             B 2 A
  122. .                             C 3 E
  123. .                             D 2 E
  124. .                             E 1 E
  125. .
  126. .    There are two equally good paths from F to C (through E  and
  127. D, and through A and B), F selects these at random.
  128. .
  129. .    Also,  the  rest  of the net need to be told about  the  new
  130. network  topology.    First,  A  (and  simultaneously,  E)  tells 
  131. everyone  it can hear that F is one hop away from it.   B  checks 
  132. it's routing tables,  decides that this is good news,  and passes 
  133. the  news  along  to everyone it can  hear,  etc.   This  is  the 
  134. flooding  algorithm again,  with a twist;  stations only pass  on 
  135. good  news,  so if a station already has a path of length  N,  it 
  136. only  passes on news of a path of N-1.   In other words,  when  B 
  137. announces to A and C that "I'm 2 hops from F", C is glad to hear, 
  138. while A could care less, since A is only 1 from F, while C didn't 
  139. even know F existed.   C will wind picking the first path to F it 
  140. hears about,  since it has 2 paths of length 3 to F.   This  also 
  141. means  that C might use a different path to F than F would use to 
  142. C; this does not matter since each have the same length.
  143. .
  144. .    F  would  also  pass on the news of  it's  complete  routing
  145. table,  since the whole table is news to it.   This way, A learns 
  146. of the new path through F to E and E learns about it's new paths.  
  147. The new tables would look like this:
  148. .
  149. .             B 1 B   A 1 A   A 2 B   A 3 A   A 2 F
  150. .             C 2 B   C 1 C   B 1 B   B 2 C   B 3 D
  151. .             D 3 B   D 2 C   D 1 D   C 1 C   C 2 D
  152. .             E 2 F   E 3 C   E 2 D   E 1 E   D 1 D
  153. .             F 1 F   F 2 A   F 3 A   F 2 E   F 1 F
  154. .
  155. .               A <---> B <---> C <---> D <---> E
  156. .               ^                               ^
  157. .               |                               |
  158. .                -------------> F <-------------
  159. .
  160. .                             A 1 A
  161. .                             B 2 A
  162. .                             C 3 E
  163. .                             D 2 E
  164. .                             E 1 E
  165. .
  166. .    Adding  a  node  to the network is  easy  compared  to  what
  167. happens when a node leaves the net.   Having a node  tell the net 
  168. it's leaving is impractical, because that node may not be able to 
  169. tell  the net because of hardware failures,  power  failures,  or 
  170. propogation changes.   One solution would be for a node to report 
  171. to  the  rest of the net that node X is unreachable  whenever  it 
  172. can't  pass  traffic  on to X.   This bad news  would  be  passed 
  173. through the net until it reaches X,  which would then tell  those 
  174. stations  it  can still reach that it is indeed still  reachable, 
  175. generating a new set of entries in the network tables.
  176. .
  177. .    As an example,  A is passing traffic for E through F when  F
  178. goes  off  the  air.   A,  realizing that it can't  pass  traffic 
  179. through  F announces to B that E is unreachable.   B passes  this 
  180. news  to C,  who passes on to D,  and eventually to E.   At  this 
  181. point, E has been erased from everyone's routing tables.  E would 
  182. then  tell D "I'm still accessable",  D reports to C that  "E  is 
  183. still  1 hop from me",  and the good news passes through the  net 
  184. (and contradicts any bad news still circulating).   A may now use 
  185. the longer path through B, C and D, and the network has recovered 
  186. from the loss of the path to E through F.  
  187. .
  188. .    The  problem  of  updating the routing tables  is  the  most
  189. serious drawback of this algorithm,  and I am not suggesting that 
  190. the  method  I  have explained above is the  best.   In  Computer 
  191. Networks  by  Andrew Tannenbaum,  he points out that  "good  news 
  192. travels fast" while bad news may take awhile to propogate through 
  193. the network,  especially where looped paths exist.  By completely 
  194. eliminating  a station from the network tables  and  re-inserting 
  195. it, many of these kinds of problems may be avoided.
  196. .
  197. .    I  have  explained  two  decentralized  routing  algorithms.
  198. These  algorithms allow the nodes themselves,  on an equal basis, 
  199. to decide how to route data in the net, and dynamically alter the 
  200. routing  when  the network composition  changes.   What  are  the 
  201. problems involved in a centralized algorithm?
  202. .
  203. .    Centralized  algorithms  require  a single station  to  have
  204. complete knowlege of the network.  To do this, the master station 
  205. must probe the network,  and pass on it's discoveries to the rest 
  206. of the net.  The master must either be a unique station type, or, 
  207. in  a homogeneous network,  a station must be  selected to be the 
  208. master.  A new station, when it comes on the air, must be able to 
  209. tell the master it is on,  and, if it can't reach a master, would 
  210. most  likely  become one.   Problems exist,  in the case  of  two 
  211. networks "growing" together (more than one master),  and when the 
  212. master  fails.   Depending on the implementation,  a network  may 
  213. continue  to operate without the master based on old  information 
  214. the master distributed,  or collapse when the master  disappears.  
  215. Either solution would be undesirable.
  216. .
  217. .    I  have shown that a properly designed decentralized  system
  218. will  not  suffer  unduly from the loss of  any  single  critical 
  219. station,  and  recover from the loss of any node in a  reasonable 
  220. manner.    Centralized   systems  rely  on  the  master   station 
  221. discovering the complete network topology, finding changes due to 
  222. propogation,  etc.  and  distributing this info.   Since  Amateur 
  223. packet nets are very dynamic, it is probable that the master will 
  224. be  lost,  causing the net to crash,  or continue on without  any 
  225. direction.
  226. .
  227. .    While  I  feel  the  decentralized  approach  is  best,  the
  228. possibility  of  reasonable mechanisms for operating  centralized 
  229. networks,  hybrid networks,  rings,  token passing  schemes,  and 
  230. other are all worth investigating.   My main purpose is to  serve 
  231. as a catalyst for further discussion.
  232. .
  233. .                     What's in a Layer?
  234. .                             or
  235. .               Why Layer Three is not Linking
  236. .
  237. .                 by Lynn W. Taylor, WB6UUT
  238. .
  239. .  I have been reading a lot of papers recently discussing some
  240. planned hardware,  and some "wish lists" for layer 3 (and higher) 
  241. protocols.   In  most of these,  it seems to me that the  authors 
  242. have drifted from the goal of defining what should be done at the 
  243. Communications  Subnet  level (layer 3) of  the  ISO  model.   To 
  244. explain  this level as I understand it,  I am going to present an 
  245. analogy,  discuss the issues I feel are and aren't important, and 
  246. suggest  why  layer 3 and linking should be considered  together.  
  247. Finally, I will present my layer 3 "wish list."
  248. .
  249. .  As   a  brief  review,   layer  1  (physical)  gives  us   a
  250. communications  media or channel.   Our specific choices on  this 
  251. later are Radio,  HDLC,  Bell 202 and 1200 baud; it does not deal 
  252. with error rates or channel sharing.
  253. .
  254. .  On layer 2, we take our channel resource and split it up (in
  255. time)  into  'virtual' channels,  and we take steps to  insure  a 
  256. (nearly)  error  free channel.   Our specific layer 2  is  AX.25, 
  257. which  defines a Local Area Net,  and provides a means to  extend 
  258. the  LAN where signal propogation is inadequate to allow the most 
  259. distant   users  to  communicate  (digipeating).    In  the   Los 
  260. Angeles/San Diego LAN,  the most distant users are over 120 miles 
  261. apart;  the user must have some knowlege of the network  topology 
  262. (who can hear whom) in order to communicate with other users.
  263. .
  264. .  Another  network worth considering is the telephone  system.
  265. In this  network,  we have a physical level (baseband  audio  on 
  266. wires),  a data link layer (the local office switch),  and a good 
  267. example of a communications subnet layer.   Layer 1 is handled by 
  268. wire.   On  layer 2,  10,000 users (which share a prefix) can  be 
  269. directly connected together by switches in a single exchange.  On 
  270. layer 3, things get more complex.
  271. .
  272. .  While only a short distance apart, it is not possible for my
  273. phone (497 prefix) to be connected to my parents (494 prefix); we 
  274. are  in  seperate "local networks" or local exchanges.   In  this 
  275. trivial  case  (both  exchanges are in  the  same  building),  my 
  276. exchange  selects  a  'trunk'  which connects  it  to  the  other 
  277. exchange, and then on to the call's destination.
  278. .
  279. .  In  the  case  of a longer call (from my  home  in  Southern
  280. California to Pete Eaton in Saint Louis, for example), I "invoke" 
  281. a long range network (which my exchange knows how to access), and 
  282. trunks are selected connecting to various switching centers, into 
  283. Pete's exchange, and on to Pete's phone.
  284. .
  285. .  The  important thing to note here is that,  as far as I  can
  286. tell, my phone can directly be connected to any phone in my local 
  287. dialing area (a geographically large LAN),  or any other phone in 
  288. the world -- without my knowing (or even being able to find  out) 
  289. which trunks,  exchanges, routing centers, etc. are involved.  In 
  290. other  words,  the task of the communications subnet layer is  to 
  291. make  it  appear  that every station in the net can  be  directly 
  292. connected to every other.
  293. .
  294. .  As a user in the LAN, what I should be able to do is exactly
  295. the  same  as  when I dial my telephone -- connect to  any  other 
  296. station by simply specifying the call sign of that station.   The 
  297. connect may fail because the destination node is down,  busy,  or 
  298. simply  unreachable.   In  a seperate paper,  I have suggested  a 
  299. decentralized  mechanism  which would allow  dynamic  routing  of 
  300. packets  as the network changes -- other algorithms are possible, 
  301. including  centralized and hybrid networks.   What ever method is 
  302. finally chosen,  it should appear to the user that every  station 
  303. in the net can talk directly to every other node in the net.
  304. .
  305. .  Notice  that  many  of these statements are as valid  for  a
  306. long-distance  network  (AMICON)  as for  a  local  network,  and 
  307. pehaaps  even mre valid.   It should not be necessary for me  to 
  308. specify that my data be transferred via Los Angeles,  Las  Vegas, 
  309. Salt  Lake City,  etc.  to get to Saint Louis;  especially if the 
  310. route  via  San  Diego,  Tucson,  Taos,  Houston,  etc.  is  less 
  311. congested, or if a critical node is down along the other route.
  312. .
  313. .  I  am  concerned  when  other issues  start  "invading"  the
  314. communications subnet,  such as non-connect communications,  such 
  315. as sattelite (PACSAT) routing,  and mail-type services.   In the 
  316. case of message traffic,  Bulletin boards and PACSAT gateways can 
  317. provide  the necessary store-and-forward services.   In order  to 
  318. incorporate this in a protocol,  w must deal with such issues as 
  319. how to store this data (provide some nodes with lots of memory?), 
  320. how  to  access this distributed database,  and how long to  keep 
  321. these messages around.   In my opinion, this is an application of 
  322. the network best dealt with at the application level (layer 7).
  323. .
  324. .  In  the phone system,  special procedures are  necessary  to
  325. access the long-range network (dialing '1').  I don't think it is 
  326. unreasonable  to  set up a gateway to a  long-haul  network,  and 
  327. require  the  user to connect to this station to  access  distant 
  328. networks.   A question here is, do I want my TNC to indicate that 
  329. I am connected to the distant station,  or is it OK or me to be 
  330. connected to the gateway itself.   A good option here might be to 
  331. connect to the linker,  give it the call I want to talk  to,  and 
  332. disconnect,  allowing  it to connect (at layer 3) to me when  the 
  333. path is established.
  334. .
  335. .  In other words, we want a communications subnet to be usable
  336. without any specialized knowlege of it's topography.  In order to 
  337. reach this goal,  layer 3 is concerned with routing;  it does not 
  338. state  whether  we  are extending our  LAN,  or  linking  distant 
  339. networks.
  340. .
  341. .  While  these are seperate issues,  I don't think one can  be
  342. considered without the other.  On one hand, linking LAN's is much 
  343. more  difficult  if you must give detailed  routing  information; 
  344. some  kind  of  layer  3 is almost essential  for  the  long-haul 
  345. net   On the other hand,  the LAN layer 3 would require  each 
  346. node  to  have some information about the network it's in;  if  a 
  347. long-haul gateway knows who it can reach in it's LAN,  it can  be 
  348. queried  for  a  specific station -- this query could  provide  a 
  349. "directory  assistance" function.   Using "area  codes"  suggests 
  350. that  a "packet directory" would need to be published.   A scheme 
  351. allowing  a query throughout the long-haul network  would  handle 
  352. this  case,  and  also  allow me to travel to  another  area  and 
  353. receive connects through the appropriate gateway.
  354. .
  355. .   Now  that I have presented some of my thoughts on the topics
  356. of linking and layer 3,  I would like to present my "wish  list."  
  357. I would like to see a communications subnet layer running on the 
  358. TNC in the LAN,  allowing me to connect to any station in the net 
  359. by requesting a connect to that station.  I want the algorithm to 
  360. be able  to handle changing topography (due  to  stations  going 
  361. on/off line,  or changing propogation and dynamically re-route my 
  362. packets;  this does not allow for a user-specified routing, since 
  363. the  network has the authority to change the routing.   I want  a 
  364. similar  capability  to exist in the long-haul  network,  plus  a 
  365. 'directory assistnce' capability allowing me to access a station 
  366. by call sign without knowing exactly where he is in the net.
  367. .
  368. .  I  think  this is attainable using present hardware.   As  I
  369. discussed  in  my  previous paper ("A Proposed  Layer  3  Routing 
  370. Algorithm"),  I  feel  it  is possible to  have  dynamic  routing 
  371. in a connection environment.  The tables necessary to handle this 
  372. in the  LAN make the necessary data available to  the  long-haul 
  373. net.   This  will allow a smoothly operating local  net,  and  an 
  374. easily  accessable long-haul network which is fairly tolerant  of 
  375. failures; it should also be simple enough to implement.
  376.  
  377. [End of Article]
  378.  
  379.